BlueCielo Meridian Enterprise 2018 VBScript API Reference
PublisherSourceEvent_BeforePublish event
Occurs in the source vault before publishing starts.
Syntax
PublisherSourceEvent_BeforePublish (destType, destAddress, _
destDocId, destDocPath, destDocName, publishOptions)
Parameter | Description |
---|---|
destType |
The name of the destination system link, for example, BC Meridian or Windows file system. |
destAddress |
The address of the destination system as shown on the BlueCielo Enterprise Server Destination page, for example, DataStoreName@MachineName for the Meridian Enterprise system link. |
destDocId |
The ID of the document in the destination system. Contains an empty value if the document does not yet exist in the destination system. |
destDocPath |
The path of the document in the destination system. |
destDocName |
The name of the document in the destination system. |
publishOptions |
The publishing options to apply to the job. If the options were specified in the source system client application, they are passed in this parameter. For information about the publishing options supported by a specific system link, see the system link description in the BlueCielo Meridian Enterprise Server Administrator's Guide. |
Return value
An array of variants. The first element in the array is treated as a new value for DestDocID parameter.
Example
Function PublisherSourceEvent_BeforePublish (destType, destAddress, _ destDocId, destDocPath, destDocName, publishOptions) Document.Log _ "Started publishing: " & _ "to " & destType & " '" & destAddress & "'" & _ " document with ID '" & destDocId & "'" & _ " with options '" & publishOptions & "'" & _ " and path '" & destDocPath & "' and name '" & destDocName & "'" End Function
The Documentum system link supports storing the Documentum object ID in a property in Meridian Enterprise. The value of this property can be returned to determine whether a new document or a new document revision for an existing document must be created.
Following is an example of retrieving the property. The property can be set as described in PublisherSourceEvent_AfterPublish event.
Function PublisherSourceEvent_BeforePublish(destType, destAddress, _ destDocId, destDocPath, destDocName, publishOptions) ' The event handler may return the document Id ' in order To override the location of the destination document. ' If the array Is returned, try To parse the first element ' To be used as the destination id. PublisherSourceEvent_BeforePublish = Array(Document.DocumentumID) End Function